<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no" />
    <title>智能翻译</title>
    <!--标准mui.css-->
    <link rel="stylesheet" href="../css/mui.min.css">
    <script src="../js/mui.min.js"></script>
    <!--App自定义的css-->
    <link rel="stylesheet" type="text/css" href="../css/app.css" />
    <link rel="stylesheet" href="../npl/css/vant.mini.css" />
    <script src="../js/vue.js"></script>
    <script src="./cellBtns/index.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" href="./cellBtns/css.css">
    <link rel="stylesheet" href="./yuyinwenzi/voice.css">
    <!-- 语音文字组件 -->
    <script src="../js/jquery-3.6.0.min.js"></script>
    <script src="../js/vconsole.min.js"></script>
    <script src="../js/sm2.js"></script>
    <script src="../js/sm3.js"></script>
    <!-- <script src="../js/feedback.js"></script> -->
    <script src="../js/clipboard.js"></script>
    <script src="../js/flexible.js"></script>
    <script src="../npl/js/vant.mini.js"></script>
    <script src="../js/elementui.js"></script>
    <link rel="stylesheet" href="../css/elementui.css">
    <script src="./text.js" type="text/javascript"></script>
    <script src="../js/spark-md5.min.js"></script>
    <style>
        #app {
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: #fff !important;
        }

        .trainTicketstitle {
            /* background-image: linear-gradient(to right, rgb(13, 121, 131), rgb(25, 179, 182)); */
            /* padding: 0rem 0.2rem; */
            color: #fff;
            height: 1rem;
            font-size: 0.35rem;
        }

        .mui-btn-blue,
        .mui-btn-primary,
        input[type=submit] {
            background-color: rgb(25, 179, 182);
            color: #fff;
            border: 1px solid rgb(25, 179, 182);
            border-radius: 4px;
            margin-right: 10px;
        }

        .mui-toast-container {
            top: 50%;
        }

        ::-webkit-input-placeholder {
            color: black;
        }

        .mui-pull-left {
            color: #fff;
        }

        .left {
            text-align: center;
        }

        .left b {
            line-height: 0.5rem;
            color: #fff;
        }

        .left .left1 {
            position: absolute;
            left: 0.1rem;
            top: 0.25rem;
        }

        .left_title {
            line-height: 0.5rem;
            color: #fff;
            font-weight: 600;
        }

        .List {

            flex: 1;
            /* padding: 0 .5rem; */
            overflow-y: scroll;
            position: absolute;
            width: 100%;
            top: calc(46px + 3.7rem);
            bottom: 10px;
        }

        #openFile {
            background: none !important;
            /* position: absolute; */
            font-weight: 500;
            color: #5f84f7;
            font-size: 11px;
            /* width: 20%; */
            height: 100%;
            top: 0;
            right: 0rem;
            padding: 0;
            border: none;
        }

        .transition_btn {
            /* margin-left: 10px; */
            border-radius: 50px;
            font-size: 13px !important;
        }


        .List_wrapper .List_time {
            height: 16px;
            line-height: 16px;
            /* background-color: rgba(95, 132, 247, 0.08); */
            border-radius: 18px;
            font-family: PingFang SC;
            color: #2d343c;
            font-size: 10px;
            padding: 0 5px;
            /* position: absolute; */
            /* float: left; */
            display: flex;
            /* align-items: center; */
            /* justify-content: space-between; */
            /* border-right: 1px solid #ccc; */
            color: #5f6871;
            font-size: 13px;
            left: 0%;
            top: 0%
        }

        .List_wrapper {
            height: 16px;
            width: 200px;
            line-height: 16px;
            /* position: absolute; */
            display: flex;
        }

        .List_wrapper1 {
            height: 16px;
            width: 85%;
            line-height: 16px;
            position: absolute;
            left: 17%;
            top: 52%
        }

        .List_img img {
            width: 100%;
            height: 100%;
        }

        .List_img {
            width: .7rem;
            height: .7rem;
            margin-right: 15px;
        }

        #multipartFile1 {
            width: 100%;
            height: 100%;
            position: absolute;
            opacity: 0;
            left: 0;
            top: 0;
            z-index: 999;
        }

        .van-popup--center {
            border-radius: 12px;
            width: 90%;
            padding: 20px 10px;
            display: flex;
            justify-content: space-around;
            flex-direction: column;
            height: 50%;
        }

        .wrpper {
            /* width: 34px; */
            margin-top: 5px;
            height: 100%;
            display: flex;
            justify-content: space-between;
            position: relative;
            align-items: center;
        }

        .wrpper_warp {
            display: flex;
            justify-content: space-between;
            position: relative;
            align-items: center;
            padding: 0 .5rem;
            background-color: #fff;

        }

        .wrpper_warp:active {
            filter: brightness(97%);
        }

        .wrpper1 {
            /* width: 34px; */
            /* height: 64px; */
            width: 100%;
            display: flex;
            justify-content: space-between;
            position: relative;
            align-items: center;
            padding: .4rem 0;
            border-bottom: 1px solid #f1f1f1;
        }

        .List_title1 {
            width: 100%;
            height: .5rem;
            line-height: .5rem;
            position: absolute;
            font-family: PingFang SC;
            font-weight: 500;
            color: #2d343c;
            font-size: 13px;
            left: 16%;
            top: 20%
        }

        .List_title {
            width: 100%;
            /* height: .5rem; */
            line-height: .5rem;
            /* position: absolute; */
            font-family: PingFang SC;
            font-weight: 600;
            color: #2d343c;
            font-size: 16px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            /* left: 0%; */
            /* top: 48% */
        }

        .van-popup__close-icon--top-right {
            top: 11px;
            right: 11px;
        }

        .icon_del {
            /* position: absolute; */
            top: 20px;
            position: absolute;
            z-index: 1;
            cursor: pointer;
            right: 20px;
        }

        .omit {
            /* width: 200px; */
            /* display: flex;
            align-items: center; */
            width: 90px;
            display: flex;
            align-items: center;
            justify-content: center;

        }

        #circle_img {
            animation: none;
            width: 100%;
            height: 100%;
        }

        @-webkit-keyframes circle {
            0% {
                -webkit-transform: rotate(0deg);
                transform: rotate(0deg);
            }

            100% {
                -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
            }
        }

        @-moz-keyframes circle {
            0% {
                -moz-transform: rotate(0deg);
                transform: rotate(0deg);
            }

            100% {
                -moz-transform: rotate(360deg);
                transform: rotate(360deg);
            }
        }

        @keyframes circle {
            0% {
                -webkit-transform: rotate(0deg);
                transform: rotate(0deg);
            }

            100% {
                -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
            }
        }

        [v-cloak] {
            display: none !important;

        }

        /* 解决组件黑边 */
        .van-swipe-cell__right {
            margin-right: -1px;
        }



        .van-dialog__message--has-title {
            padding-top: 16px;
        }

        .list-enter-active,
        .list-leave-active {
            transition: all 0.5s;
        }

        .list-enter,
        .list-leave-to

        /* .list-leave-active in <2.1.8 */
            {
            opacity: 0;
            transform: translateY(-30px);
        }

        .right_btn {
            width: 120px;
            height: 100%;
            display: flex;
            justify-content: space-between;
            background-color: #29d079;
        }

        .btn_l,
        .btn_l {
            width: 50%;
            height: 100%;
        }

        .van-button__content {
            display: flex;
            flex-direction: column;
        }

        .right_btn .van-icon__image {
            width: 1.5em;
            height: 1.5em;
        }

        .right_btn .van-button__icon {
            width: 1.5em;
            height: 1.5em;
        }

        .van_pop {
            align-items: center;
            height: 47%;
            padding: 10px !important;
        }

        .van-button--primary {
            background-color: #19A97B;
        }

        .p_btn {
            width: 48%;
            height: .8rem;
            background-color: #13C09B;
            border-radius: 30px;
            color: #fff
        }

        .van_pop_text {
            color: #000;
            font-size: 18px;
            font-weight: bold;
        }

        .checkBtn {
            width: 80%;
            height: 50%;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            /* border: 1px #13C09B dashed; */
        }

        .transImg {
            display: flex;
            justify-content: space-between;
            width: 100%;
            height: 2rem;
            padding: 0 .3rem;
        }

        .transImgbox {
            width: 46%;
            height: 100%;
        }

        .transImgbox img {
            width: 100%;
            height: 100%;
        }

        .tranSeach_wrapper {
            margin-top: .5rem;
            padding: 0 .3rem;
            align-items: center;
            display: flex;
            justify-content: space-between;
            height: .8rem;
        }

        .tranSeach {
            width: 100%;
            align-items: center;
            display: flex;
            height: 100%;
            justify-content: space-between;
        }

        .tranSeach_r {
            width: .3rem;
            height: .3rem;
        }

        .tranSeach_r img {
            width: 100%;
            height: 100%;
        }

        .tranSeach span {
            font-size: 14px;
            color: #666;
        }

        .van-search {
            padding: 0px !important;
        }

        input[type=search] {
            margin: 0px !important;
            padding: 0px 5px !important;
            background: none !important;
        }

        .van-search .van-cell {
            padding: 0px !important;
            align-items: center;
        }

        .van-field__left-icon .van-icon,
        .van-field__right-icon .van-icon {
            display: none;
        }

        .van-field__left-icon {
            width: .35rem;
            height: .35rem;
            background: url(../image/search.png) no-repeat;
            background-size: 100% 100%;
        }

        .van-search__content {
            background-color: #fff;
        }

        .van-search__content--square {
            border-radius: 12px;
            padding: 0 10px;
            border: 1px #ccc solid;
        }

        .page_box {
            display: flex;
        }

        .page_text {
            display: flex;
            margin-left: .3rem;
            flex-direction: column;
            justify-content: space-between;
        }

        .page_img {
            width: 44px;
            height: 53px;
        }

        .van_pop_text {
            color: #000;
            font-size: 18px;
            font-weight: bold;
        }

        .checkBtn {
            width: 80%;
            height: 50%;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            /* border: 1px #13C09B dashed; */
        }

        .van-radio__icon--checked .van-icon {
            background-color: #13C09B;
            border-color: #13C09B
        }

        /* .van-radio:nth-child(1) {
            margin-bottom: .7rem;
        } */
        .radio_img {
            width: 65px;
            height: 65px;
            margin-bottom: .4rem;
        }

        .radio_img img {
            width: 100%;
            height: 100%;
        }

        .van-radio-group {
            display: flex;
        }

        .radio_box {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .radio_box:nth-child(1) {
            margin-right: 1rem;
        }
    </style>
</head>

<body>
    <div id="app" style="display:flex;flex-direction: column;" v-cloak>
        <div class="is-loading">
            <div class="is-loading">
                <div class="curtain" id="curtain">
                    <div class="loadingBgc">
                        <div class="loader"></div>
                    </div>
                </div>
            </div>
        </div>
        <div style="margin-bottom: .3rem" class='trainTickets'>
            <div class='trainTicketstitle'>
                <div class="header_tit">
                    <van-nav-bar title="智能翻译" left-arrow>
                        <template #left>
                            <div class="back_l" @click="home"><img src="../image/left.png" alt=""></div>
                        </template>
                    </van-nav-bar>
                </div>
            </div>
        </div>
        <div class="box_wrap">
            <div class="transImg">
                <div @click="ssfy(0)" class="transImgbox">
                    <img src="../image/trans2.png" alt="">
                </div>
                <div @click="ssfy(1)" class="transImgbox">
                    <img src="../image/trans1.png" alt="">
                </div>
            </div>
            <div class="tranSeach_wrapper">
                <div class="tranSeach" v-if="!showSeach">
                    <span>会议翻译记录</span>
                    <div @click="showSeach=true" class="tranSeach_r">
                        <img src="../image/search.png" alt="">
                    </div>
                </div>
                <form style="width:100%" v-else>
                    <van-search v-model="seachcontent" show-action maxlength="50" placeholder="请输入搜索关键词"
                        @keydown.enter="onInput()" @cancel="onCancel" />
                </form>

            </div>
            <van-popup class="van_pop" round closeable v-cloak :close-on-click-overlay="false" v-model="showShare">
                <div class="van_pop_text">分享到i国网</div>
                <div class="checkBtn">
                    <van-radio-group v-model="radio">
                        <div class="radio_box" @click="radio = '1'">
                            <div class="radio_img"><img src="../image/join3.png" alt=""></div>
                            <van-radio name="1">语音文件</van-radio>
                        </div>
                        <div class="radio_box" @click="radio = '2'">
                            <div class="radio_img"><img src="../image/join2.png" alt=""></div>
                            <van-radio name="2">翻译文字</van-radio>
                        </div>
                    </van-radio-group>
                </div>
                <van-button @click="downFile" class="p_btn">确 认</van-button>
            </van-popup>
            <div class="List">
                <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="gettranslatList">
                    <transition-group name="list" tag="ul">
                        <van-swipe-cell v-for="(item,index) in listData" :key="item.id">
                            <div class="wrpper_warp " @click="shorthandBtn(index,item)">
                                <div class="wrpper1 ">
                                    <div class="page_box" style="width: 60%">
                                        <div class="page_img">
                                            <img src="../image/page.png" alt="">
                                        </div>
                                        <div class="page_text">
                                            <div class="List_title">{{item.messageTitle | fileNametext}}</div>
                                            <div class="List_wrapper">
                                                <div class="List_time">
                                                    <span>{{ item.createTime | dateTimeText }}</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- <div class="omit">
                                        <button id="openFile" v-if="item.translation == 1" type="button"
                                            class="transition_btn" disabled style="color: #29d079;">
                                            <van-icon name="success" size="16px" />
                                        </button>
                                    </div> -->
                                </div>
                            </div>
                            <template #right>
                                <div class="right_btn">
                                    <div class="btn_l">
                                        <van-button style=" width: 100%;
                            height: 100%;" @click="joinBtn(item)" icon="../image/join.png" square text="分享"
                                            type="primary" />
                                    </div>
                                    <div class="btn_r">
                                        <van-button style=" width: 100%;
                        height: 100%;border: none;" @click="delAddConfirm(0,item.id)" icon="../image/del1.png" square
                                            text="删除" type="danger" />
                                    </div>
                                </div>
                            </template>
                        </van-swipe-cell>
                    </transition-group>
                </van-list>
            </div>
        </div>

    </div>
    <script>
        new Vue({
            el: "#app",
            data() {
                return {
                    showSeach: false,
                    seachcontent: '',
                    clearabl: true,
                    loading: false,
                    finished: true,
                    listData: [
                        //     {
                        //     translation: 1,
                        //     id: 1,
                        //     createTime: '2021-02-12',
                        //     messageTitle: '空军航空就好看看开会好看好看222111'
                        // }
                    ],
                    num: 0,
                    disabled: false,
                    estInterval: null,
                    channelId: '',
                    isflageIOX: false,
                    showShare: false, //分享按钮
                    listIds: '',
                    paths: '',
                    listTitle: '',
                    listMessage: '',
                    sceneNo: 31,
                    radio: '1',
                }
            },
            computed: {},
            filters: {
                dateTimeText: (value) => {
                    if (!value || new Date(value) == 'Invalid Date') return "";
                    const date = new Date(value)
                    const currentY = new Date().getFullYear()
                    const Y = date.getFullYear()
                    const M = date.getMonth() + 1
                    const D = date.getDate()
                    const h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
                    const m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
                    if (currentY === Y) {
                        return `${M}月${D}日 ${h}:${m}`
                    } else {
                        return `${Y}年${M}月${D}日 ${h}:${m}`
                    }
                },

                fileNametext: (value) => {
                    if (!value) return "";
                    let data = value.split("");
                    if (data.length < 12) {
                        return value;
                    }
                    return value.slice(0, 12) + "...";
                },
            },
            created() {

                const _this = this
                _this.compatibleInput()
                $("#circle_img").css("animation", "circle 1s linear infinite")
                _this.$nextTick(() => {
                    _this.gettranslatList(0);
                });
                let jsApiList = []
                $.getScript("../js/jweixin-sgccigw-1.0.0.js" /*"js/jweixin-1.0.0.js"*/ , function () {
                    'use strict';
                    wx.ready(function () {
                        wx.onHistoryBack(() => {
                            _this.home()
                            return false
                        })
                    });
                    jsApiList = [
                        'onHistoryBack',
                        'ext_Net_Download',
                        'multiWindows_subscribe',
                        'ext_Net_MultiDownload',
                        'getZipAppDirectory'
                    ];
                    wx.config({
                        beta: true,
                        debug: false,
                        appId: corpid,
                        timestamp: '1626832073',
                        nonceStr: nonceStr,
                        signature: signature,
                        jsApiList: jsApiList
                    });
                });
            },
            mounted() {},

            methods: {

                checkJion() {
                    data = {
                        sceneNo: "45",
                        text: this.listMessage,
                        title: this.listTitle
                    }
                    greneralRequest("/tjAiAssistant/shareFile/shareToBase64", JSON.stringify(data))
                },
                onInput() {
                    this.loading = false
                    this.finished = false
                    this.listData = []
                    this.num = 0
                    this.gettranslatList()
                },
                onCancel() {
                    this.showSeach = false
                    this.seachcontent = ''
                    this.onInput()
                },

                joinBtn(item) {
                    this.radio = "1"
                    this.listIds = item.attachmentId
                    this.listTitle = item.messageTitle
                    this.listMessage = item.dataText + "|" + item.resultText
                    this.showShare = true

                },
                createNonceStr(len) {
                    var e = len ? len : 16;
                    var t =
                        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
                        a = t.length,
                        n = "";
                    for (i = 0; i < e; i++)
                        n += t.charAt(Math.floor(Math.random() * a));
                    return n;
                },
                downFile() {
                    $("#curtain").css("display", "block");
                    let that_ = this
                    const timestamp = new Date().getTime() + ""
                    that_.showShare = false
                    if (that_.radio == "2") {
                        that_.checkJion()
                        return
                    }
                    let userId = sessionStorage.getItem("userId");
                    // let recordArr = JSON.parse(res.result)
                    that_.channelId = "net_upload_" + that_.createNonceStr(16) + new Date()
                        .getTime() + "";
                    wx.invoke("multiWindows_subscribe", {
                        channelId: that_.channelId
                    }, function (res) {
                        console.log(res.data.result, "监听的数据")
                        if (res.data.event == "success") {
                            $("#curtain").css("display", "none");
                            console.log(res.data.result.replace("file://", ""), 888)
                            wx.invoke("ext_Intent_SystemShare", {
                                data: {
                                    content: res.data.result.replace("file://", ""),
                                    contentType: "FilePath",
                                    fileName: "10086",
                                }
                            }, function (res) {
                                wx.invoke("getZipAppDirectory", {
                                    "type": "STORAGE_ROOT_DIR", //APP_ROOT_DIR
                                }, function (res) {
                                    console.log(res, 999)
                                    that_.paths = res.directory
                                    console.log(that_.paths, "that_.paths")
                                    if (that_.isflageIOX) {
                                        wx.invoke("ext_FileManager_Remove", {
                                                "data": {
                                                    fileList: [that_.paths +
                                                        "voice.mp3",
                                                    ]
                                                }
                                            },
                                            function (res) {
                                                console.log(
                                                    "ext_FileManager_Remove",
                                                    res);
                                            })
                                    }

                                })
                            })
                        }
                    })

                    //获取绝对路径
                    var path
                    wx.invoke("getZipAppDirectory", {
                        "type": "STORAGE_ROOT_DIR", //STORAGE_ROOT_DIR
                    }, function (res) {
                        console.log(res, "路径")
                        var path = res.directory ? res.directory : ''
                        console.log(that_.listIds, "listIds")
                        // 2.开始下载任务
                        let voiceSign = sm3(timestamp + "&" + that_.listIds);
                        wx.invoke("ext_Net_Download", {
                            data: {
                                cmd: "download",
                                url: localUrlLink + iscp_port +
                                    `/tjAiAssistant/voice/getAudioByAttachmentId?Authentication=${sessionStorage.getItem("Authentication")}&id=${that_.listIds}&sign=${voiceSign}&timestamp=${timestamp}`, //下载url地址
                                header: {},
                                id: that_.channelId, //与channelId保持一致
                                timeout: 10,
                                fileName: "voice.mp3", //保存的文件名
                                path: path //文件保存路径使用getZipAppDirectory获取
                            }

                        }, function (res) {
                            console.log("downloadfile ", res);
                            if (res.event === 'start') { //任务开始成
                                console.log("任务id：", res.id)
                            }
                            if (res.event === 'fail') { //任务失败
                            }
                        })
                    })

                },
                // 判断安卓还是ios
                compatibleInput() {
                    //获取浏览器的userAgent,并转化为小写
                    var ua = navigator.userAgent.toLowerCase();
                    //判断是否是苹果手机，是则是true
                    var isIos = ua.indexOf("iphone") != -1 || ua.indexOf("ipad") != -1;
                    if (isIos) {
                        this.isflageIOX = true;
                    } else {
                        this.isflageIOX = false;
                    }
                },
                home() {
                    $(location).attr("href", "Home.html");
                },
                ssfy(num) {
                    if (num == 1) {
                        $(location).attr("href", "conferenceTransmission.html");
                        return
                    }
                    $(location).attr("href", "realtimeTranslation.html");
                },
                delAddConfirm(num, id) {
                    const _this = this
                    window.vant.Dialog.confirm({
                            title: '删除文件',
                            confirmButtonColor: '#FF0000',
                            message: '删除后不可恢复',
                            confirmButtonText: '删除',
                        })
                        .then(() => {
                            _this.delAdd(id)
                        })
                        .catch(() => {
                            // on cancel
                        });

                },
                delAdd(id) {
                    userId = sessionStorage.getItem("userId");
                    iscp_port = sessionStorage.getItem("iscp_port") || "";
                    let data = {
                        "id": id,
                        "userId": userId,
                        "timestamp": new Date().getTime() + ""
                    };
                    data = JSON.stringify(data)
                    let sign = sm3(data);
                    let resResult
                    let AuthenticationSession = sessionStorage.getItem("Authentication");
                    var URL
                    $.ajax({
                        url: localUrlLink + iscp_port + "/tjAiAssistant/translation/isDelete",
                        type: "post",
                        async: false, //是否同步，false表示同步请求
                        dataType: "json",
                        data: data,
                        headers: {
                            "Content-Type": "application/json;charset=UTF-8",
                            Authentication: AuthenticationSession,
                            sign: sign
                        },
                        success: (res, txt, xhr) => {
                            if (sm3(res.resultValueStr) == xhr.getResponseHeader("sign")) {
                                let Authentication = xhr.getResponseHeader("Authentication")
                                if (res.code == 200) {
                                    if (Authentication) {
                                        sessionStorage.setItem("Authentication", Authentication);
                                        mui.toast(res.resultValue, {
                                            duration: 'long',
                                            type: 'div'
                                        })
                                        this.onInput();
                                    }
                                } else if (res.code == 500) {
                                    mui.toast(res.resultValue, {
                                        duration: '1000',
                                        type: 'div'
                                    })
                                } else {
                                    mui.toast('请求异常,请稍后再试', {
                                        duration: '1000',
                                        type: 'div'
                                    })
                                }
                            } else {
                                mui.toast('完整性校验失败', {
                                    duration: '1000',
                                    type: 'div'
                                })
                            }
                        },
                        error: (e) => {
                            mui.toast('请求异常,请稍后再试', {
                                duration: '1000',
                                type: 'div'
                            })
                        },
                    });
                },
                // 详情
                shorthandBtn(index, item) {
                    window.sessionStorage.setItem(
                        "translateItem",
                        JSON.stringify(item)
                    );
                    $(location).attr("href", "conferenceDetial.html");
                },
                // 列表接口
                gettranslatList() {
                    // $("#curtain").css("display", "block");
                    const userId = sessionStorage.getItem("userId");
                    iscp_port = sessionStorage.getItem("iscp_port") || "";
                    this.num += 1
                    let data = {
                        "userId": userId, //用户id
                        "timestamp": new Date().getTime() + "",
                        "pageNum": this.num,
                        "messageTitle": this.seachcontent
                    };
                    data = JSON.stringify(data)
                    let sign = sm3(data);
                    let AuthenticationSession = sessionStorage.getItem("Authentication");
                    $.ajax({
                        url: localUrlLink + iscp_port +
                            "/tjAiAssistant/translation/queryTranslationList",
                        type: "POST",
                        async: false, //是否同步，false表示同步请求
                        dataType: "json",
                        data: data,
                        headers: {
                            "Content-Type": "application/json;charset=UTF-8",
                            Authentication: AuthenticationSession,
                            sign: sign
                        },
                        success: (res, txt, xhr) => {
                            $("#curtain").css("display", "none");
                            $("#circle_img").css("animation", "none")
                            let sm3res = JSON.stringify(res)
                            if (sm3(res.resultValueStr) == xhr.getResponseHeader("sign")) {
                                let Authentication = xhr.getResponseHeader("Authentication")
                                if (res.code == 200) {
                                    if (Authentication) {
                                        sessionStorage.setItem("Authentication", Authentication);
                                    }
                                    this.total = res.resultValue.total
                                    // if (this.num == 1) {
                                    //     console.log(532, this.num)
                                    //      this.listData  = []
                                    // }
                                    res.resultValue.list.forEach((item) => {
                                        // 预计等待时间
                                        this.listData.push(item)
                                    })
                                    if (this.total == 0) {
                                        this.finished = true;
                                    }
                                    if (res.resultValue.list.length < 20) {
                                        this.finished = true;
                                    }
                                    // 加载状态结束
                                    this.loading = false;
                                    if (this.listData.length >= this.total) {
                                        this.finished = true;
                                    }
                                } else {
                                    mui.toast(res.resultValue, {
                                        duration: 'long',
                                        type: 'div'
                                    })
                                }
                            } else {
                                mui.toast('完整性校验失败', {
                                    duration: 'long',
                                    type: 'div'
                                })
                            }
                        },
                        error: (e) => {
                            $("#curtain").css("display", "none");
                            $("#circle_img").css("animation", "none")
                            mui.toast('请求异常,请稍后再试', {
                                duration: 'long',
                                type: 'div'
                            })
                        },
                    });
                },
            },
        })
    </script>
</body>

</html>